www.gusucode.com > 云网互动影视系统(12套模版和资源联盟) 6.2 > 云网互动影视系统(12套模版和资源联盟) 6.2.4/免费版/Play/otvplayer.js

    function SetMediaFull()
{
  return  otvplayer.MediaFull();
}
function MediaPlay()
{
   return otvplayer.MediaPlay();
}

function MediaPause()
{
   return otvplayer.MediaPause();
}

function MediaStop()
{
   return otvplayer.MediaStop();
}

function GetPosition()
{
   return otvplayer.GetPosition();
}

function GetTotalTime()
{
   return otvplayer.GetTotalTime();
}
function GetBufferPercent()
{
   ret=0;

   try
   {
      ret=otvplayer.GetBufferPercent();
   }
    catch(err)
   {
     
   }
   return ret;
}

function GetBitrate()
{
   ret=0;

   try
   {
      ret=otvplayer.GetBitrate();
   }
  catch(err)
   {
     ret=0;
   }
   return ret;
}

function GetCurrentTime()
{
   return otvplayer.GetCurrentTimes();
}

function GetPlayState()
{
   return otvplayer.GetPlayState();
}
function OTVStart()
{
   try{
        return otvplayer.Start(P2PUrl);
      }
      catch(err)
     {
       mediabuffestatus.innerText="OTVStart 播放参数错误";

       return 0;
     }
}
function SetAutoPlay(flag)
{
    try{
           otvplayer.SetAutoPlay(flag);
       }
      catch(err)
     {
           mediabuffestatus.innerText="SetAutoPlay错误,";
     }
}

function SetSize(w,l)
{
    try{
           otvplayer.SetMediaWidth(w);
           otvplayer.SetMediaHeight(l);
           otvplayer.SetMediaSize();
       }
      catch(err)
     {

     }
}

function SeekPosition(pos)
{
  return otvplayer.SeekPosition(pos);
}

function SetSoundPos(pos)
{
    pos=13*Math.sqrt(pos);
      
    if(pos>100)
    {
        pos=100;
    }
  
    otvplayer.nSoundPercent=pos;
}

function GetSoundPos()
{
   var pos=80;
   
   pos=(otvplayer.nSoundPercent*otvplayer.nSoundPercent)/100;
  
   if(pos>100)pos=100;
  
   return pos;
}
var mutepos=90;

function SetSoundMute()
{
  pos=GetSoundPos();
    
  if(pos>0)
  {
      mutepos=pos;
   
      SetSoundPos(0);
      
      soundmute.src="Play/st_sound.jpg"
   }
   else
   {
      SetSoundPos(mutepos);
      
      soundmute.src="Play/sound.jpg"
   }
}